﻿using System;

namespace BDElectron.Utils
{
    public class dataValidator
    {
        public dataValidator()
        {
        }

        public bool isEmail(string inputEmail)
        {
            bool result = false;

            System.Text.RegularExpressions.Regex rEMail = new System.Text.RegularExpressions.Regex(@"^[a-zA-Z][\w\.-]{2,28}[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");

            if (rEMail.IsMatch(inputEmail) && inputEmail.Length > 0)
            { result = true; }

            return result;
        }

    }
}
